package org.suigara.d3.info;

public class D3Info {
	public static final String BASE_URL = "https://api.battlenet.com.cn/d3/";
	// public static final String LOCALE = "zh_CN";
	public static D3Info info = new D3Info();

	public static D3Info getInstance() {
		return info;
	}

	public String roleUrl(String tagid) {
		return BASE_URL + "profile/" + tagid + "/?locale=zh_CN&"
				+ getApiKeyStr();
	}

	public String heroUrl(String tagid, String heroId) {
		return BASE_URL + "profile/" + tagid + "/hero/" + heroId
				+ "?locale=zh_CN&" + getApiKeyStr();
	}

	public String itemUrl(String itemTag) {
		return BASE_URL + "data/item/" + itemTag + "?locale=zh_CN&"
				+ getApiKeyStr();
	}

	private String getApiKeyStr() {
		return "apikey=" + getApiKey();
	}
	
	private String apiKey = "aanwqrv36q4waukbrq4gh77yn89wzxxv";

	public String getApiKey() {
		return apiKey;
	}

	public void setApiKey(String apiKey) {
		this.apiKey = apiKey;
	}

	private D3Info() {

	}

}
